#[derive(Debug)]
struct Structure(i32);

#[derive(Debug)]
struct Deep(Structure);

fn main() {
    println!("{:?}", Structure(1)); //Structure(1)
    println!("{:?}", Deep(Structure(1))); //Deep(Structure(1))

    //基本类型
    println!("{:?} year?", 12);

    // 使用{:?}可以展示双引号，表明是字符串
    println!("{1:?} {0:?}  {actor:?}", "A", "B", actor = "C"); //"B" "A"  "C"
                                                               //使用{}没有展示双引号
    println!("{1} {0}  {actor}", "A", "B", actor = "C"); //B A  C

    // 美化输出
    #[derive(Debug)]
    struct Person<'a> {
        name: &'a str,
        age: u8,
    }

    let name = "perter";
    let age = 29;
    let perter = Person { name, age };

    println!("perter is {:#?}", perter);
    // perter is Person {
    //      name: "perter",
    //      age: 29,
    // }
}
